package org.lboot.flow.event;

import cn.hutool.core.lang.Validator;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.lboot.flow.module.event.sp.FlowEventServiceProvider;

import java.util.Map;

@Data
@ApiModel(value = "事件消费者元数据")
public class FlowEventConsumerMeta {
    public FlowEventConsumerMeta(){
        this.node = "localhost";
        this.lang = "Java";
    }

    public FlowEventServiceProvider injectMeta(FlowEventServiceProvider sp){
        if (Validator.isEmpty(version)){
            sp.setVersion("默认版本");
        }
        sp.setNode("localhost");
        sp.setLang("Java");
        return sp;
    }


    // 版本
    String version;

    // 部署位置 127.0.0.1 / localhost
    String node;

    // 实现语言 Java Python
    String lang;
}
